<!--
 * @Author: your name
 * @Date: 2022-03-22 09:18:38
 * @LastEditTime: 2022-03-23 00:18:35
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \算法测试\day0906\3.22.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #container {
            padding-left: 200px;
            padding-right: 150px;
            overflow: auto;
        }

        #container p {
            float: left;
        }

        .center {
            width: 100%;
            background-color: lightcoral;
        }

        .left {
            width: 200px;
            position: relative;
            left: -200px;
            margin-left: -100%;
            background-color: lightcyan;
        }

        .right {
            width: 150px;
            margin-right: -150px;
            background-color: lightgreen;
        }

        .clearfix:after {
            content: "";
            display: table;
            clear: both;
        }
    </style>
</head>

<body>


    <!-- <div class="outer">
        <div class="left">左侧</div>
        <div class="right">右侧</div>
    </div> -->
    <div id="container" class="clearfix">
        <p class="center">我是中间</p>
        <p class="left">我是左边</p>
        <p class="right">我是右边</p>
    </div>

    <div style="width: 200px;height: 200px;position: relative;background-color: red;">
        <div style="width: 100px;height: 100px;margin: auto;top: 0;left: 0;right: 0;bottom: 0; position: absolute; background-color: green;"></div>
    </div>

    <br>
    <div style="width: 200px;height: 200px;background-color: red;display: flex;">
        <div style="width: 100px;height: 100px;background-color: green;margin: auto;"></div>
    </div>
    <script>
        let d = new Date();
        console.log(d);
        console.log(d.getTime());
        let arr = [];
        arr.length = 123;
        //填充整个数组的所有元素为fill内的值 必须先指定长度 
        //否则没有元素 无法填充 不生效

        arr = new Array(10, 2).fill(1);
        let arr1 = [123]
        console.log([...arr, ...arr1]);

        let arrmap = ['1', '2', '3'];
        console.log(arrmap.map((a) => {
            return a * 2;
        }));
        console.log(arrmap.map(parseInt));
    </script>
</body>

</html>